package cn.cloudreal.cbms.statements.dao.impl;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import cn.cloudreal.cbms.castDetail.dao.impl.CastDetailDaoImpl;
import cn.cloudreal.cbms.statements.dao.MediaCountDao;
import cn.cloudreal.cbms.vo.MediaCount;
/**
 * 
 * Description:媒体数统计Dao层实现类
 * 
 * Company:云恒瑞通
 * 
 * 
 * @author HuangCanCan
 * @date 2012-08-15
 */
public class MediaCountDaoImpl extends SqlMapClientDaoSupport implements MediaCountDao {	
    /** 日志工具类实例 */
    private static final Logger log = Logger.getLogger(CastDetailDaoImpl.class);
    /** 定义命名空间 */
	private static final String GET_MEDIACOUNT_LIST = "mediacount.getMediaList";
	/**
	 * 实现媒体数统计
	 * 
	 */
	public List<MediaCount> getMediaList(Map condition) {
	    // 打印进入方法体日志
        if (log.isInfoEnabled())
        {
            log.info("Enter CastDetailDaoImpl getMediumCastDetailCount() method, return int");
        }
        //初始化
		List<MediaCount> mediaCount = null;		
		//查询
		mediaCount = getSqlMapClientTemplate().queryForList(GET_MEDIACOUNT_LIST, condition);
		 // 打印退出方法体日志
        if (log.isInfoEnabled())
        {
            log.info("Exit CastDetailDaoImpl getProjectCastDetailList() method, return List<CastDetail>");
        }
		return mediaCount;
	}
}
